import requests
from bs4 import BeautifulSoup

url = "http://192.168.255.3"
user_name = "用户名"
password = "密码"
data = {
    'DDDDD': user_name,
    'upass': password,
    '0MKKey': ''
}

response = requests.post(url, data=data)
soup = BeautifulSoup(response.text, 'html.parser')

# 查找包含登录状态信息的元素
message = soup.title
message = message.text.strip()
print(message)
if message != "认证成功页":
    print("登录失败!")
else:
    print("登录成功!")
